﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<CRM.Database.Model.Customers>" %>




<%@ Import Namespace="CRM.Resourses" %>


<% Html.DevExpress().GridView(settings =>
                                    {
                                        settings.Name = "gdPriceContidions";
                                        settings.KeyFieldName = "IdPriceCondition";
                                        settings.CallbackRouteValues =
                                            new { Controller = "Contracts", Action = "CustomerPriceConditionsPartial", customerId = Model.IdCustomer };
                                        settings.SettingsPager.PageSize = 20;

                                        settings.Columns.Add(column =>
                                        {
                                            column.Caption = Resourses.LegalEntityName;
                                            column.FieldName = "LegalEntityName";


                                        });
                                        
                                        settings.Columns.Add(column =>
                                                                 {
                                                                     column.Caption = Resourses.Product;
                                                                     column.FieldName = "ProductStr";
                                                                 });

                                        settings.Columns.Add(column =>
                                        {
                                            column.Caption = Resourses.PriceEuroM;
                                            column.FieldName = "Price";
                                        });

                                        settings.Columns.Add(column =>
                                        {
                                            column.Caption = Resourses.StartDate;
                                            column.FieldName = "DateStart";
                                        });

                                        settings.Columns.Add(column =>
                                        {
                                            column.Caption = Resourses.EndDate;
                                            column.FieldName = "DateEnd";
                                        });

                                        settings.Columns.Add(column =>
                                        {
                                            column.Caption = Resourses.PriceConditionType;
                                            column.FieldName = "PriceConditionTypeStr";
                                        });

                                        settings.Columns.Add(column =>
                                        {
                                            column.Caption = Resourses.AdditionalContract;
                                            column.FieldName = "IdContract";
                                        });


                                        settings.Columns.Add(column =>
                                        {
                                            column.Caption = Resourses.TransportCondition;
                                            column.FieldName = "TransportConditionStr";
                                        });

                                        settings.Columns.Add(column =>
                                        {
                                            column.Caption = Resourses.MetresInPallette;
                                            column.FieldName = "MetresInPalletteStr";
                                        });

                                        settings.Columns.Add(column =>
                                        {
                                            column.Caption = Resourses.ExtraCharge;
                                            column.FieldName = "ExtraChargeStr";
                                        });
                                        settings.Columns.Add(column =>
                                        {
                                            column.Caption = Resourses.PriceWithTransport;
                                            column.FieldName = "PriceWithTransportStr";
                                        });
                                      

                                     
                                    }).Bind(Model.PriceConditions).GetHtml();
                                    
                                    
                                    %>

